#include <iostream>
#include <vector>
using namespace std;

bool searchVal(vector<int>::iterator beg, vector<int>::iterator end, int val){
   bool z = 0;
   vector<int> :: iterator itr;
   for(itr = beg; itr != end; itr++ ){
   	if(*itr == val){
	   z = 1;
	   }
   }
   return z;}
int main(){
	vector<int> aList = {1,3,5,7,9,10};
	cout << searchVal(aList.begin(), aList.end(), 2) << endl;
}
